package com.bestcem.xm.member.grpc.service.param.project;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @author dc.wang <dc.wang@idiaoyan.com>
 * @version V1.0
 * @description 分页查询项目请求参数。 注: 该参数为grpc专属参数，没有orgId参数校验
 * @date 2021/7/19
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ListProjectsParam {
    /**
     * 企业标识
     */
    @NotBlank(message = "企业标识为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识格式错误")
    private String orgId;

    /**
     * 项目标识
     */
    @Valid
    @NotEmpty(message = "项目标识不存在")
    private List<@Pattern(regexp = RegTypes.OBJECT_ID, message = "项目标识格式错误") String> ids;

    private String userId;
}
